package com.chengqs.rapid.common.exception;

import com.chengqs.rapid.common.enums.ResponseCode;
import lombok.Getter;

/**
 * <B>主类名称：</B>RapidConnectExeception<BR>
 * <B>概要说明：</B>连接异常定义类<BR>
 *
 * @author: chengqs
 * @create: 2025-03-17 19:08:54
 **/
public class RapidConnectException extends RapidBaseException {

    private static final long serialVersionUID = -8503239867913964958L;

    @Getter
    private final String uniqueId;

    @Getter
    private final String requestUrl;

    public RapidConnectException(String uniqueId, String requestUrl) {
        this.uniqueId = uniqueId;
        this.requestUrl = requestUrl;
    }

    public RapidConnectException(Throwable cause, String uniqueId, String requestUrl, ResponseCode code) {
        super(code.getMessage(), cause, code);
        this.uniqueId = uniqueId;
        this.requestUrl = requestUrl;
    }
}
